run javascript commands in python file